Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing /
Chapter 4 - Advanced Printing Features / Using Advanced Printing Features


Formatting for Text Job Format Mode Printing

If the user chooses to print in a direct mode and the driver's preferred mode is gxTextJobFormatMode, you may choose to reformat the document based on the characteristics of the printer. You must query the printer driver to obtain these characteristics by calling the GXJobFormatModeQuery function, which is described on page 4-83.

QuickDraw GX provides an enumerated data type whose values specify the characteristics that you may determine. You use one of these values in the GXGetJobFormatModeQuery function to specify the characteristic of interest. Table 4-4 identifies these characteristics. Variables of type gxQueryType are used to store the kind of request.
Table 4-4 Text job format mode query options
ConstantExplanation
gxGetJobFormatLineConstraintQueryUsed to determine line constraint characteristics
gxGetJobFormatFontConstraintQueryUsed to determine font positioning constraints
gxGetJobFormatFontCommonStylesQueryUsed to determine the style name, such as "normal" or "bold"
gxSetStyleJobFormatCommonStyleQueryUsed to set style contents
gxGetJobFormatFontsQueryUsed to determine font information

A query returns a pointer to a data structure that contains the requested information. The kind of data structure depends on the kind of query.

The following structures are used to interpret the source and destination data:

struct gxPositionConstraintTable {
   gxPoint  phase;
   gxPoint  offset;
   long     numSizes;
   Fixed    sizes[1];
};
Note
A numSizes value of gxConstraintRange indicates a range of sizes, in which size[0] specifies the minimum size and size[1] specifies the maximum size.
struct gxStyleNameTable {
   long     numStyleNames;       /* number of style names */
   Str255   styleNames[1];       /* any number of style names */
};
struct gxFontTable {
   long     numFonts;         /* number of font references */
   gxFont   fonts[1];         /* any number of font references */
};

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help